#ifndef utils_H_
#define utils_H_

#include <string>
#include <sstream>
#include <iomanip>

namespace gimabl {

inline std::string GetHexString(const char*buf, int size)
{
    std::ostringstream out;
    for (int i = 0; i < size; i++)
    {
        out << "0x" << std::hex << std::setw(2) << std::setfill('0') <<static_cast<int>(buf[i]) << " ";
    }
    return out.str();
}

inline std::string GetHexString(const unsigned char *buf, int size)
{
    std::ostringstream out;
    for (int i = 0; i < size; i++)
    {
        out << "0x" << std::hex << std::setw(2) << std::setfill('0') <<static_cast<int>(buf[i]) << " ";
    }
    return out.str();
}

};


#endif // !utils_H_
